package org.example.ExperimentTwo;

import java.util.Scanner;
import java.util.concurrent.Callable;

public class Main {
    public static void main(String[] args) {
        Callable<Void> task=Main::fun1Callable;
        try {
            Void result1 = TimeUtils.measureTime(Main::fun1Callable);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static  Void fun1Callable(){
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        System.out.println(str);
        int length = str.length();
        System.out.println(length);

//         计算星号的数量
        int count = 0;
        for (int i = 0; i < length; i++) {
            if (str.charAt(i) == '*') {
                count++;
            }
        }

//          将星号移动到开头
        char[] result = new char[length];
//          使用单独的索引来遍历result数组
        int j = 0;
        for (int i = 0; i < length; i++) {
            if (str.charAt(i) == '*') {
                result[j++] = '*';
            }
        }

//         非星号字符依次放在数组后面
        for (int i = 0; i < length; i++) {
            if (str.charAt(i) != '*') {
                result[j++] = str.charAt(i);
            }
        }
        // 输出结果
        System.out.println(new String(result));
        return null; // Callable任务需要有返回类型，这里因为我们不关心返回值，所以返回null
    }
}



